<html>
    <head>
        <title><g:layoutTitle default="JAVA exPress - Aukcje" /></title>
        <link rel="stylesheet" href="${createLinkTo(dir:'css',file:'main.css')}" />
        <link rel="shortcut icon" href="${createLinkTo(dir:'images',file:'favicon.ico')}" type="image/x-icon" />
        <g:layoutHead />
        <g:javascript library="application" />
        <gui:resources components="tabView"/>
    </head>
    <body class="yui-skin-sam">
        <div id="spinner" class="spinner" style="display:none;">
            <img src="${createLinkTo(dir:'images',file:'spinner.gif')}" alt="Spinner" />
        </div>
        <div class="logo">
            <img src="${createLinkTo(dir:'images',file:'dworld_czarne_bez_ramki.png')}" 
            alt="Developers World" id="dworldlogo" />
            <img src="${createLinkTo(dir:'images',file:'logo_JeP_czarne.png')}" 
            alt="JAVA exPress" id="jeplogo" />
        </div>
        <div id="page">
            <div class="content">
                <g:layoutBody />
            </div>
            <div id="profil">
                <div class="login">
                    <g:isNotLoggedIn>
                        <g:link controller="login">Zaloguj</g:link>
                    </g:isNotLoggedIn>
                    <g:isLoggedIn>
                        <strong><g:loggedInUserInfo field="username" /></strong>
                        <g:link controller="logout">Wyloguj</g:link>
                    </g:isLoggedIn>
                </div>
                
                <gui:tabView>

                    <gui:tab label="Menu" active="true">
                    <div id="menu">
                        <span class="menuButton"><a class="home" href="${createLinkTo(dir:'')}">Start</a></span>
                        <span class="menuButton"><g:link class="list" controller="auction" action="list">Aukcje</g:link></span>
                        <g:ifAllGranted role="ROLE_ADMIN">
                            <span class="menuButton"><g:link class="list" controller="user" action="list">Użytkownicy</g:link></span>
                        </g:ifAllGranted>
                    </div>
                    </gui:tab>
                    <g:isLoggedIn>
                        <gui:tab label="Konto" controller="commitment" action="balance" />
                        <gui:tab label="Profil" controller="user" action="profile" />
                    </g:isLoggedIn>
                </gui:tabView>
            </div>
        </div>
    </body>	
</html>